Skip to content

secureta/vulnerability-links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vulnerability Links Storage

A system for storing and managing vulnerability information links with rich metadata. Each CVE has a corresponding YAML file containing curated links to advisories, proof-of-concepts (PoCs), analyses, and patches.

Features

  • 🔍 Automated link collection using AI services (Claude WebSearch + Gemini CLI)
  • 🏷️ Rich metadata for each link (source type, credibility, PoC details)
  • 📝 YAML-based storage with JSON Schema validation
  • 🤖 Automated classification of content types
  • 🎯 Issue-driven workflow with Claude Code integration
  • 🔗 Related vulnerability tracking with related_to field
  • 🧪 Comprehensive test coverage

Directory Structure

vulnerability-links/
├── data/                       # CVE YAML files (1 CVE = 1 file)
│   └── CVE-YYYY-NNNN.yaml
├── src/
│   ├── lib/                    # Core libraries
│   └── cmd/                    # CLI commands
├── schemas/                    # JSON Schema for validation
├── mcp-server/                 # MCP Server for Claude Code integration
│   ├── src/tools/              # PR management and data update tools
│   └── mcp.json               # Tool definitions
├── .github/
│   ├── workflows/              # GitHub Actions automation
│   └── ISSUE_TEMPLATE/         # Issue templates for Claude Code

Installation

  1. Install Deno (v1.x or higher)
  2. Clone this repository
  3. Set up API keys (see Configuration section)

Usage

新しいシンプルなワークフロー(推奨)

  1. GitHub Issueを作成

    • 「New issue」→「脆弱性リンク記録」テンプレートを選択
    • 記録したいURLを入力
    • 関連情報検索が必要ならチェックボックスをオン
  2. Claude Codeが自動処理

    • @claudeメンションでClaude Codeが起動
    • URLの内容を取得・解析
    • 脆弱性IDを抽出
    • PRを作成(enrichment/{CVE-ID}ブランチ)
    • YAMLファイルを更新

従来のCLIコマンド

Collect Links for a CVE

deno run --allow-net --allow-env src/cmd/collect_links.ts CVE-2024-1234

Options:

  • --since: Time range for search (default: 24h)
  • --max: Maximum number of results (default: 50)
  • --out: Output file (default: stdout)

Enrich Links with Metadata

# From command line
deno run --allow-net --allow-read=data --allow-write=data --allow-env \
  src/cmd/enrich_links.ts https://example.com/cve-2024-1234

# From stdin
cat urls.txt | deno run --allow-net --allow-read=data --allow-write=data --allow-env \
  src/cmd/enrich_links.ts

# Dry run (preview changes)
deno run --allow-net --allow-read=data --allow-write=data --allow-env \
  src/cmd/enrich_links.ts --dry-run https://example.com/poc

Update Links (Collect + Enrich)

deno run -A src/cmd/update_links.ts CVE-2024-1234 --since 7d --max 100

Run Tests

deno task test

Run Linter

deno task lint

Configuration

Environment Variables

  • ANTHROPIC_API_KEY: Required for Claude Code SDK integration
  • GEMINI_API_KEY: Required for Gemini CLI integration

Deno Tasks

Defined in deno.json:

  • deno task lint: Run linter
  • deno task test: Run tests
  • deno task collect: Run collect_links command
  • deno task enrich: Run enrich_links command
  • deno task update: Run update_links command

YAML Schema

Each CVE file follows this structure:

links:
  - url: https://github.com/researcher/cve-2024-1234-poc
    source_type: poc              # poc|advisory|blog|analysis|patch|other
    language: en
    retrieved: 2025-07-26T12:00:00Z
    credibility: 0.85            # 0-1 score
    poc:                         # Only for source_type: poc
      code_type: [python, http-request]
      privilege: unauthenticated # unauthenticated|user|admin|n/a
      network:                   # Only for remote PoCs
        protocol: [http, https]
        port: [80, 443]

GitHub Actions

The workflow runs nightly to update vulnerability links:

  1. Scheduled at 2 AM UTC daily
  2. Can be manually triggered with custom parameters
  3. Processes a configurable list of CVEs
  4. Commits changes automatically
  5. Creates issues on failure

Development

Adding New Source Types

  1. Update the JSON Schema in schemas/links-v1.schema.json
  2. Modify the source_type enum
  3. Update the classifier in src/lib/poc_classifier.ts

Extending Metadata

  1. Add fields to the LinkEntry interface in src/lib/yaml_io.ts
  2. Update the JSON Schema
  3. Modify the enrichment logic in src/cmd/enrich_links.ts

License

[Your License Here]

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors